<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <link rel="stylesheet" type="text/css" href="../CSS/tutorial.css">
      <title>XPath Tutorial</title>
      <link rel="index" href="index.html">
      <link rel="previous" href="example7.html">
      <link rel="next" href="example9.html">
   </head>
   <body>
      <table xmlns="http://www.w3.org/1999/xhtml" width="100%">
         <tr>
            <td><span class="mediumText"><b>&gt;&gt;&nbsp;English&nbsp;&lt;&lt;</b> | <a class="naviBlack" target="_self" href="../Output_cze/example8.html">česky</a> | <a class="naviBlack" target="_self" href="../Output_dut/example8.html">Nederlands</a> | <a class="naviBlack" target="_self" href="../Output_fre/example8.html">Fran&ccedil;ais</a> | <a class="naviBlack" target="_self" href="../Output_spa/example8.html">Espa&ntilde;ol</a> | <a class="naviBlack" target="_self" href="../Output_rus/example8.html">По-русски</a> | <a class="naviBlack" target="_self" href="../Output_ger/example8.html">Deutsch</a> | <a class="naviBlack" target="_self" href="../Output_chi/example8.html">中文</a> | <a class="naviBlack" target="_self" href="../Output_ita/example8.html">Italiano</a></span></td>
            <td style="text-align:right"><span class="mediumText"><a class="naviBlack" target="_top" href="http://www.zvon.org">ZVON</a>
                  		&gt;
                  		<a class="naviBlack" target="_top" href="http://www.zvon.org/index.php?nav_id=tutorials">Tutorials</a>
                  		&gt;
                  		<b>XPath Tutorial</b></span></td>
         </tr>
      </table>
      <table xmlns="http://www.w3.org/1999/xhtml" class="bar" width="750px" border="0" cellpadding="0" cellspacing="0">
         <tr>
            <td class="naviBlue"><a class="naviWhite" target="_top" href="../General/examples.html">Intro</a> 
               	/
               	  <a class="naviWhite" target="_top" href="http://zvon.org/search.php">Search</a> 
               	/
               	<a class="naviWhite" target="_top" href="http://www.zvon.org"> ZVON </a></td>
         </tr>
      </table>
      <table class="hangingMenu" border="0" cellpadding="1" cellspacing="0" width="100%">
         <tr>
            <td><b>&gt;&gt; Example 8 &lt;&lt;</b>
               		|
               <a class="naviBlack" href="example7.html">Prev</a>
               		|
               <a class="naviBlack" href="example9.html">Next</a></td>
         </tr>
      </table><br><div class="description">Function name() returns name of the element, the starts-with function returns true if the first argument string starts with
         the second argument string, and the contains function returns true if the first argument string contains the second argument
         string.
      </div>
      <div><a name="b9b1c41c27"></a>&nbsp;
      </div>
      <table border="1" cellpadding="5" width="85%">
         <tr>
            <th>//*[name()='BBB']</th>
         </tr>
         <tr>
            <td>Select all elements with name BBB, equivalent with //BBB</td>
         </tr>
         <tr>
            <td class="code">
               		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">AAA</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">BCC</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">BCC</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">DDB</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">DDB</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">BEC</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">CCC</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">DBD</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">BEC</span>&gt;
               		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">AAA</span>&gt;
               	
            </td>
         </tr>
         <tr>
            <td><a target="_top" href="http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/xpatut_8.html?stylesheetFile=XSLT/xpath.xslt&amp;value=//*[name()='BBB']&amp;lang=eng">Open the example in XLab.</a> | <a href="example8_0_png.html">Tree view (JPG)</a></td>
         </tr>
      </table>
      <div><a name="b9b1c41c29"></a>&nbsp;
      </div>
      <table border="1" cellpadding="5" width="85%">
         <tr>
            <th>//*[starts-with(name(),'B')]</th>
         </tr>
         <tr>
            <td>Select all elements name of which starts with letter B</td>
         </tr>
         <tr>
            <td class="code">
               		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">AAA</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BCC</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="elementOn">BCC</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">DDB</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BBB</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">DDB</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BEC</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">CCC</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">DBD</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="elementOn">BEC</span>&gt;
               		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">AAA</span>&gt;
               	
            </td>
         </tr>
         <tr>
            <td><a target="_top" href="http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/xpatut_8.html?stylesheetFile=XSLT/xpath.xslt&amp;value=//*[starts-with(name(),'B')]&amp;lang=eng">Open the example in XLab.</a> | <a href="example8_1_png.html">Tree view (JPG)</a></td>
         </tr>
      </table>
      <div><a name="b9b1c41c31"></a>&nbsp;
      </div>
      <table border="1" cellpadding="5" width="85%">
         <tr>
            <th>//*[contains(name(),'C')]</th>
         </tr>
         <tr>
            <td>Select all elements name of which contain letter C</td>
         </tr>
         <tr>
            <td class="code">
               		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">AAA</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BCC</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">BBB</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="elementOn">BCC</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">DDB</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">BBB</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">BBB</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">DDB</span>&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">BEC</span>&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="elementOn">CCC</span>/&gt;
               				<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<span class="element">DBD</span>/&gt;
               			<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="elementOn">BEC</span>&gt;
               		<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/<span class="element">AAA</span>&gt;
               	
            </td>
         </tr>
         <tr>
            <td><a target="_top" href="http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/xpatut_8.html?stylesheetFile=XSLT/xpath.xslt&amp;value=//*[contains(name(),'C')]&amp;lang=eng">Open the example in XLab.</a> | <a href="example8_2_png.html">Tree view (JPG)</a></td>
         </tr>
      </table>
      <div><br><br><br><div>_____________________________________________</div>
         <div><a class="smallBlackLink" target="_top" href="http://zvon.org/php/Search/codes.php">Reference Search</a> |
            <a class="smallBlackLink" target="_top" href="http://zvon.org/index.php?nav_id=zvonindex">Sitemap</a> |
            <a class="smallBlackLink" target="_top" href="http://zvon.org/index.php?nav_id=173">XML Glossary</a>
            &nbsp;&nbsp; &nbsp;&nbsp;
            <a class="smallBlackLink" target="_top" href="http://www.zvon.org">ZVON</a> |
            	<a class="smallBlackLink" target="_top" href="http://www.systinet.com">Systinet</a></div>
      </div>
      <!--partners-->
      <!--advertisement-->
   </body>
</html>